package com.dzb.langchain4j.vo;

import com.dzb.langchain4j.entity.AdmissionStatus;
import com.dzb.langchain4j.enums.AdmissionStatusEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 录取状态VO类
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AdmissionStatusVO extends AdmissionStatus {
    
    /**
     * 录取状态中文描述
     */
    private String admissionStatusDesc;
    
    /**
     * 设置录取状态并自动设置对应的中文描述
     */
    @Override
    public void setAdmissionStatus(Integer admissionStatus) {
        super.setAdmissionStatus(admissionStatus);
        this.admissionStatusDesc = AdmissionStatusEnum.getDescriptionByCode(admissionStatus);
    }
    
    /**
     * 获取录取状态中文描述
     */
    public String getAdmissionStatusDesc() {
        if (this.admissionStatusDesc == null && getAdmissionStatus() != null) {
            this.admissionStatusDesc = AdmissionStatusEnum.getDescriptionByCode(getAdmissionStatus());
        }
        return this.admissionStatusDesc;
    }
} 